4D Chart v13Creating Graphs from Records in a Database (examples) |
||
|
4D Chart v13
Creating Graphs from Records in a Database (examples)
Creating Graphs from Records in a Database (examples)
This section provides examples for creating two- and three-dimensional graphs using the CT Chart selection and CT Chart data functions. To learn about creating two- and three-dimensional graphs using arrays, refer to the section Creating Graphs from Arrays (examples). In each example, you will find:
Suppose you own a software company that has clients in a wide variety of market sectors, from government to education to retail. Your database tracks your customers and sales. Your database uses the following table to store the information: Using 4D Chart, you produce the following pie chart. It illustrates the percentage of your total sales from each sector. The following is the GRAPH PROFILE method, which was used to create the example graph. `Method: GRAPH PROFILE Suppose that you are in the market for a new car and are using a database to determine the best car for your money. You have narrowed down your search to five cars and want to compare how much each car will cost for yearly registration, insurance, and maintenance. You enter the data into the following table: To analyze the information you have gathered, you decide to graph the information in a three-dimensional graph. Using 4D Chart, you produce the following graph: The GRAPH CARS method was used to create this graph. This method uses the CT Chart selection command. When you use CT Chart selection, you pass it an array of fields. The field names become the series names, and the values in the fields are graphed on the Values axis. In this example, the Registration, Insurance, and Maintenance fields were used for the series and values. The following is the GRAPH CARS method. `Method: GRAPH CARS Suppose you are Western Regional Director of an educational program, and you would like to compare standardized test scores for students in each state in your region on different test dates. Your database contains the scores for students in your region, tagged by test date and home state. Using 4D Chart, you create the following graph: The preceding graph was created by the GRAPH SCORES 2D method. The following is the GRAPH SCORES 2D method: `Method: GRAPH SCORES 2D Suppose you would like to know how your company’s stock is performing compared to other companies in your industry. You record the daily closing value of each company’s stock in a 4D database. In the example database, the stock values are recorded as monthly averages. The following graph compares the value of Joe Bob’s Chemicals to the industry average. The data on the graph was taken directly from the database, without any manipulation. The STOCKS CHART method generates the graph using field values taken directly from the database. Since the values stored in the database are already calculated as averages, you do not need to perform any additional calculations. If you were recording daily values instead, you would need to calculate the monthly averages, store them in an array, and create the graph using the CT Chart arrays function. For an example of averaging monthly values, see the section Creating a Two-Dimensional Graph from Arrays. The following is the STOCKS CHART method: `Method: GRAPH STOCKS |
PROPERTIES
Product: 4D Chart SEE ALSO
Creating Graphs from Arrays (examples) |